package service

import (
	"context"
	"ruoyi-go-echo-ddd/internal/domain/model"
	"ruoyi-go-echo-ddd/internal/domain/repository"
)

type SysRoleDeptService struct {
	repo repository.SysRoleDeptRepository
}

func NewSysRoleDeptService(repo repository.SysRoleDeptRepository) *SysRoleDeptService {
	return &SysRoleDeptService{repo: repo}
}

func (s *SysRoleDeptService) DeleteByRoleId(ctx context.Context, roleId int64) (int64, error) {
	return s.repo.DeleteByRoleId(ctx, roleId)
}

func (s *SysRoleDeptService) BatchInsert(ctx context.Context, list []*model.SysRoleDept) (int64, error) {
	return s.repo.BatchInsert(ctx, list)
}
